/*
 * author      : 吴中勤 
 * date        : 2018/8/16
 * description : moby事件, 请求体
 */

package com.deepexi.adapter.facade.moby.request;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

public class MobyEventBody extends BaseRequestBody {

    @SerializedName("member")
    private MobyMember mobyMember;

    @SerializedName("stockOut")
    private StockOut stockOut;

    @SerializedName("outDtoTradeOrder")
    private MobyTradeOrder mobyTradeOrder;

    @SerializedName("flatTradeOrderLines")
    private List<MobyOrderLine> flatTradeOrderLineList;

    @SerializedName("outDtoOrderPayments")
    private List<MobyPayInfo> mobyPayInfoList;

    @SerializedName("refundOrders")
    private List<MobyRefundInfo> mobyRefundInfoList;

    @SerializedName("outDtoTradeOrderLines")
    private List<MobyOrderLineTreeNode> treeNodes;

    /** 拦截下来, 不同步到SAP 的订单行, 目前在【赠送保养】上使用 */
    private List<MobyOrderLineTreeNode> retainLineList;

    public MobyEventBody addLine(MobyOrderLine line) {
        if (null == flatTradeOrderLineList) {
            flatTradeOrderLineList = new ArrayList<>();
        }
        flatTradeOrderLineList.add(line);
        return this;
    }

    public MobyEventBody addRetainLine(MobyOrderLineTreeNode line) {
        if (null == retainLineList) {
            retainLineList = new ArrayList<>();
        }
        retainLineList.add(line);
        return this;
    }

    // ============= setter & getter =============

    public List<MobyOrderLineTreeNode> getTreeNodes() {
        return treeNodes;
    }

    public void setTreeNodes(List<MobyOrderLineTreeNode> treeNodes) {
        this.treeNodes = treeNodes;
    }

    public List<MobyOrderLineTreeNode> getRetainLineList() {
        return retainLineList;
    }

    public void setRetainLineList(List<MobyOrderLineTreeNode> retainLineList) {
        this.retainLineList = retainLineList;
    }

    public StockOut getStockOut() {
        return stockOut;
    }

    public void setStockOut(StockOut stockOut) {
        this.stockOut = stockOut;
    }

    public List<MobyRefundInfo> getMobyRefundInfoList() {
        return mobyRefundInfoList;
    }

    public void setMobyRefundInfoList(List<MobyRefundInfo> mobyRefundInfoList) {
        this.mobyRefundInfoList = mobyRefundInfoList;
    }

    public MobyMember getMobyMember() {
        return mobyMember;
    }

    public void setMobyMember(MobyMember mobyMember) {
        this.mobyMember = mobyMember;
    }

    public MobyTradeOrder getMobyTradeOrder() {
        return mobyTradeOrder;
    }

    public void setMobyTradeOrder(MobyTradeOrder mobyTradeOrder) {
        this.mobyTradeOrder = mobyTradeOrder;
    }

    public List<MobyOrderLine> getFlatTradeOrderLineList() {
        return flatTradeOrderLineList;
    }

    public void setFlatTradeOrderLineList(List<MobyOrderLine> flatTradeOrderLineList) {
        this.flatTradeOrderLineList = flatTradeOrderLineList;
    }

    public List<MobyPayInfo> getMobyPayInfoList() {
        return mobyPayInfoList;
    }

    public void setMobyPayInfoList(List<MobyPayInfo> mobyPayInfoList) {
        this.mobyPayInfoList = mobyPayInfoList;
    }

}
